package com.dtwave.lnstreaming.bean;

import lombok.Data;

import java.util.Comparator;

@Data
public class ArrearInfo implements Comparator<ArrearInfo> {

    private String COD_ACCT_NO;
    private String COD_ARREAR_TYPE;
    private String AMT_ARREARS_DUE;
    private Integer SEQ_1;
    private Integer SEQ_2;

    //order by seq_1,seq_2 asc
    //按照seq_1,seq_2升序排序，seq_1相同的情况下按照seq_2升序
    @Override
    public int compare(ArrearInfo asc1, ArrearInfo asc2) {
        int flag = asc1.getSEQ_1().compareTo(asc2.getSEQ_1());
        if (flag == 0) {
            return asc1.getSEQ_2().compareTo(asc2.getSEQ_2());
        } else {
            return flag;
        }
    }
}
